home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
fractal
/
moe
/
moe.doc
< prev
next >
Wrap
Text File
|
1993-07-31
|
11KB
|
206 lines
Moe: Mandelbrot Orbital Exploration
===================================
(C) 1993 Brian Boese
All Rights Reserved
Moe is freeware. Distribute it freely. I only ask that you try it out for a
little while, and then send a postcard telling me what you think of it. See
"Registration" below for more details.
Requirements: IBM PC or Compatible
DOS 3.3 or higher
EGA, VGA, or SuperVGA video card
Recommended: Mouse
Math co-processor
Included in this archive:
moe.exe moe.doc moe.cfg mand.pic
8rain.map basic.map bluein.map blues.map
default.map gamma2.map goodega.map greenin.map
neon.map redin.map volcano.map
Also included in the registered version: (the complete source code)
egavga.obj moe.pas mouselib.pas mouselib.tpu
mouslib8.zip svga256m.obj svgabg40.zip
This program was inspired in part by the wonderful program by those people in
the Stone Soup group, FractInt. I wanted a simpler way to view the orbitals
of points chosen from inside or outside the Mandelbrot set. I looked at the
program Forb, but it wasn't quite sophisticated enough for what I wanted to
do, and so here is Moe.
For those people not already fractally inclined, the Mandelbrot set is more
than a nifty design on a T-shirt. It is a mathematically defined object
which shows how chaotic behaviour can arise from very simple rules. The
rules for the Mandelbrot set are as follows:
Any point 'c' in the complex plane is either in the Mandelbrot
set or not. Start with z=0, and then iterate the function
"z becomes z*z + c" for a while. If z manages to go beyond a
certain boundary, then the initial point c was not in the set.
Otherwise the point c _might_ be in the Mandelbrot set.
The complex plane is just a two-dimensional 'set' of numbers, which you can
imagine correspond to physical points on your monitor. A complex number
looks like 'a + bi', where both a and b are real numbers, and i is the square
root of -1. In other words, i times i is -1.
Don't worry if you don't really understand this little bit of math... I know
it might look a little strange. (After all, your teachers probably always
told you that negative numbers don't have roots. And then again, your pocket
calculator will just show a big E instead of an answer.) But when numbers
are defined in this way, magic can happen! All the ingredients are there for
the highly complex Mandelbrot set.
Notice that in the definition of the Mandelbrot set above it only tells you
if the point c is _not_ in the set. You might think that by a simple process
of elimination you will eventually get the exact set. This is _almost_ true.
Sometimes an orbit will move into a periodic cycle (the values for z keep
repeating over and over), in which case that orbit will not diverge, which
means that it must therefore be part of the Mandelbrot set.
The problem here is that it can take a _long_ time before a cycle emerges
from the orbit. The Mandelbrot set picture shown by Moe was generated by a
program I wrote using high-precision math, for about 1,000,000 iterations
worth for each pixel. The pixels shown in black are part of the Mandelbrot
set and the rest are not, or at least on the most part they are. About a
dozen of the pixels shown in black were not able to converge to a cycle
within the memory of my computer, plus most of the points on the line to the
left of the set. If you have a binary file viewer, you can tell the
difference: Each byte in the file corresponds to a point on the 480x480
Mandelbrot picture. Points which converged to a cycle have a value of 255
(or $FF), points which have diverged have a value in the range from 1 to 254
(or $01 to $FE), and all points which neither converged nor diverged have a
value of 0.
Moe will let you explore one entrancing property of the Mandelbrot set, its
orbitals. Choose the point c from anywhere on the screen, and all of the z
values will be animated for you. (At least until the orbits start to diverge
or converge, or you get a little bored and abort.)
Moe currently requires that you have an EGA, VGA, or SVGA adapter installed.
If you happen to have some other card, you will have to find another machine
with one installed to run Moe properly. (Try a friend's house, school, or
work.) If you don't like this, send me a postcard complaining (see
Registration below). Enough postcards and I might eventually add in a new
video mode.
While the program is running, you have several controls at your disposal:
Mouse: Move the cursor to any point on the screen
Cursor Keys: Move the cursor by one pixel in that direction
Page Up/Down: Move the cursor 5 pixels up or down
Home/End: Move the cursor 5 pixels left or right
'x', 'y': Set the x- or y-coordinate explicitly
(*) '1' through '8': Change the x-offset value at that digit
(*) '!' through '*': Change the y-offset value at that digit
(*) '0': Clear the x-offset
(*) ')': Clear the y-offset
'c': Load in a different color map
'z': zoom in to examine an orbital more closely
'p': change the number of passes for redrawing
's': toggle sound on and off
'e': toggle orbital erasing on and off
'm': unzoom back to the original Mandelbrot screen
'r': redraw the current screen
'q'/Escape: End the Program
Left Mouse Click: Select that pixel for starting the orbital
Any other key: Same as Left Mouse Click
(*) These keys are actually user-definable via the command-line or the
moe.cfg file. See below for the correct syntax. Changing tbe values of
the x- or y-offset allows you to pick the starting point from anywhere
within the current pixel. This can be especially useful if you wish to
explore various orbitals which start from extremely close starting
positions. Note that these keys are 1-8,0 and shifted 1-8,0 on the
American keyboard.
The Escape key can also be used to abort an operation in progress. For
example, when you are entering an exact value for the starting position,
choosing a place to zoom, or drawing a zoomed screen, you can push the Escape
key to cancel. When drawing the screen, though, it doesn't really abort. It
just temporarily sets the number of passes to zero to speed up the redraws.
Syntax: moe [option...]
options: maxiter=n n is the number of orbitals shown
3 <= n <= 3000
default is 3000
erase=yes/no erase old orbitals?
default is yes
map=filename the name of the color map file to use
default is "default.map"
xkey=xxxxxxxxx the 9 keys to use for adjusting the x-offset
default is "123456780"
ykey=yyyyyyyyy the 9 keys to use for adjusting the y-offset
default is "!@#$%^&*)" (American keyboard)
xoff=n the initial x-offset (as an integer)
0 <= n < 62500000
default is 0
yoff=n the initial y-offset (as an integer)
0 <= n < 62500000
default is 0
x=n the first x-coordinate to use
-2.0 <= n < 1.0
default is 0.0
y=n the first y-coordinate to use
-1.5 <= n < 1.5
default is 0.0
sound=yes/no whether or not you want to hear the beeps
default is yes
passes=n how many passes you want when zooming
n must be 1, 2, or 3
video=mode which type of adapter you want Moe to use
currently supported are EGA, VGA, and SVGA
default is VGA
These options may also be given in the moe.cfg file. Any options given on
the command line override those in the configuration file. If no moe.cfg
file exists, it will create one with the default settings.
You can create or modify the moe.cfg file to conform to your favorite
options. For example, if you have a preferred color map or if your keyboard
does not conform to the default American keyboard, you can set it up to
automatically use your preferences.
If you are familiar with the excellent program FractInt, you may have a
favorite color map from there. Moe will allow you to use that color map
just by telling it to at startup. Included with Moe are several of my
favorite color maps. They look best in SVGA mode, but 8rain, default, and
goodega look good on a VGA screen.
Note: If you need to conserve disk space, or if you only have an EGA card,
then you can delete the file MAND.PIC. If the file is not present, or
if you are using an EGA adapter, then Moe will calculate the Mandelbrot
picture on the fly. The reason for not using this file if you have an
EGA adapter is that the EGA's maximum mode is 640x350, but the picture
was generated at 640x480.
Registration
============
If you use Moe, please send a postcard to the following address:
Brian Boese
20 Ormonde Avenue
St. Catharines, Ontario
Canada
L2M 5P2
This is mostly so that I can know approximately how many people are using my
program, so I can know whether it would be worth my while to make major/minor
improvements to Moe. But if nobody is using my program then what would be
the point? This can also be a source of information and comments about Moe
for myself. What do you like about Moe? What would you like to see
improved? Added? Removed? What do you hate? Without your comments I can
only write programs the way I see fit, and you know how programmers can get...
If you like using Moe, or if you find it to provide useful information, then
I ask that you send a small donation of $5.00 to the above address. This
program is not FreeWare, but it is freely distributable in an unmodified
form. (I figure I'm going to get a lot more postcards than checks.) This is
more or less just a token sum, and I don't think it is too unreasonable.
If you send $10.00, a disk, and a self-addressed-stamped-envelope, then I
will be happy to send you a copy of the program complete with full source
code. This will be the most-up-to-date version of the program, of course.